package a.d;

public class z
{
  private double a;
  private double c;
  public static int d;
  
  public z(double paramDouble1, double paramDouble2)
  {
    this.a = paramDouble1;
    this.c = paramDouble2;
  }
  
  public z(z paramz)
  {
    this.a = paramz.a();
    this.c = paramz.b();
  }
  
  public z(w paramw1, w paramw2)
  {
    this.a = (paramw1.a() - paramw2.a());
    this.c = (paramw1.b() - paramw2.b());
  }
  
  public z(w paramw)
  {
    this.a = paramw.a();
    this.c = paramw.b();
  }
  
  public z(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    this.a = (paramDouble1 - paramDouble3);
    this.c = (paramDouble2 - paramDouble4);
  }
  
  public double a()
  {
    return this.a;
  }
  
  public double b()
  {
    return this.c;
  }
  
  public void c()
  {
    boolean bool = w.e;
    if (!bool) {
      if (this.a == 0.0D)
      {
        if (bool) {
          break label35;
        }
        if (this.c == 0.0D) {
          return;
        }
      }
    }
    label35:
    double d1 = d();
    this.a /= d1;
    this.c /= d1;
  }
  
  public z a(double paramDouble)
  {
    double d1 = Math.cos(paramDouble) * this.a - Math.sin(paramDouble) * this.c;
    double d2 = Math.sin(paramDouble) * this.a + Math.cos(paramDouble) * this.c;
    return new z(d1, d2);
  }
  
  public void a(z paramz)
  {
    this.a += paramz.a();
    this.c += paramz.b();
  }
  
  public static z a(z paramz1, z paramz2)
  {
    z localz = new z(paramz1);
    localz.a(paramz2);
    return localz;
  }
  
  public static w a(w paramw, z paramz)
  {
    return new w(paramw.a() + paramz.a(), paramw.b() + paramz.b());
  }
  
  public void b(double paramDouble)
  {
    this.a *= paramDouble;
    this.c *= paramDouble;
  }
  
  public double d()
  {
    return Math.sqrt(this.a * this.a + this.c * this.c);
  }
  
  public static boolean b(z paramz1, z paramz2)
  {
    if (!w.e) {}
    return paramz1.a() * paramz2.b() - paramz1.b() * paramz2.a() > 0.0D;
  }
  
  public static z b(z paramz)
  {
    z localz = new z(paramz.a(), paramz.b());
    localz.c();
    return localz;
  }
  
  public static z c(z paramz)
  {
    double d1 = paramz.d();
    return new z(-paramz.b() / d1, paramz.a() / d1);
  }
  
  public static double c(z paramz1, z paramz2)
  {
    return paramz1.a() * paramz2.a() + paramz1.b() * paramz2.b();
  }
  
  public static double d(z paramz1, z paramz2)
  {
    boolean bool2 = w.e;
    boolean bool1 = w.d;
    double d1 = c(paramz1, paramz2) / (paramz1.d() * paramz2.d());
    if (!bool2)
    {
      if (d1 > 1.0D)
      {
        d2 = Math.acos(1.0D);
        if (bool2) {
          break label99;
        }
        if (!bool1) {
          break label94;
        }
      }
      if (bool2) {}
    }
    else if (d1 < -1.0D)
    {
      d2 = Math.acos(-1.0D);
      if (bool2) {
        break label99;
      }
      if (!bool1) {
        break label94;
      }
    }
    double d2 = Math.acos(Math.min(1.0D, d1));
    label94:
    if (!b(paramz1, paramz2)) {
      label99:
      d2 = 6.283185307179586D - d2;
    }
    return d2;
  }
  
  public String toString()
  {
    return "X: " + a() + " Y: " + b();
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.d.z
 * JD-Core Version:    0.7.0.1
 */